cmake_minimum_required(VERSION 3.19)
project(inspect-sqlite3 C)

set(CMAKE_C_STANDARD 11)

add_library(inspect-sqlite3_lib
        src/alter.c
        src/analyze.c
        src/attach.c
        src/auth.c
        src/backup.c
        src/bitvec.c
        src/btmutex.c
        src/btree.c
        src/build.c
        src/callback.c
        src/complete.c
        src/ctime.c
        src/date.c
        src/dbpage.c
        src/dbstat.c
        src/delete.c
        src/expr.c
        src/fault.c
        src/fkey.c
        src/fts5.c
        src/fts5parse.c
        src/func.c
        src/global.c
        src/hash.c
        src/insert.c
        src/legacy.c
#        src/lempar.c
        src/loadext.c
        src/malloc.c
        src/mem0.c
        src/mem1.c
        src/mem2.c
        src/mem3.c
        src/mem5.c
        src/memdb.c
        src/memjournal.c
        src/mutex.c
        src/mutex_noop.c
        src/mutex_unix.c
        src/mutex_w32.c
        src/notify.c
        src/opcodes.c
        src/os.c
        src/os_unix.c
        src/os_win.c
        src/pager.c
        src/parse.c
        src/pcache.c
        src/pcache1.c
        src/pragma.c
        src/prepare.c
        src/printf.c
        src/random.c
        src/resolve.c
        src/rowset.c
        src/select.c
#        src/shell.c
#        src/sqlite3.c
        src/status.c
        src/table.c
        src/tclsqlite.c
        src/threads.c
        src/tokenize.c
        src/treeview.c
        src/trigger.c
        src/update.c
        src/upsert.c
        src/utf.c
        src/util.c
        src/vacuum.c
        src/vdbe.c
        src/vdbeapi.c
        src/vdbeaux.c
        src/vdbeblob.c
        src/vdbemem.c
        src/vdbesort.c
        src/vdbetrace.c
        src/vdbevtab.c
        src/vtab.c
        src/wal.c
        src/walker.c
        src/where.c
        src/wherecode.c
        src/whereexpr.c
        src/window.c
        src/sqlite3main.c

        include/btree.h
        include/btreeInt.h
        include/config.h
        include/fts5.h
        include/fts5parse.h
        include/hash.h
        include/hwtime.h
        include/keywordhash.h
        include/msvc.h
        include/mutex.h
        include/opcodes.h
        include/os.h
        include/os_common.h
        include/os_setup.h
        include/os_win.h
        include/pager.h
        include/parse.h
        include/pcache.h
        include/pragma.h
#        include/sqlite3.h
        include/sqlite3ext.h
        include/sqlite3session.h
        include/sqliteInt.h
        include/sqliteLimit.h
        include/vdbe.h
        include/vdbeInt.h
        include/vxworks.h
        include/wal.h
        include/whereInt.h

        ext/fts5/fts5Int.h
        ext/fts5/fts5.h
        include/commonutils.h src/commonutils.c)

add_executable(inspect-sqlite3 src/main.c)

target_link_libraries(inspect-sqlite3 inspect-sqlite3_lib)
